{include file="default/pc/public/mall_header"}
<style>
	.kt-menu__submenu.kt-menu__submenu--classic.kt-menu__submenu--left {
		height: 300px;
		overflow: auto;
		overflow-y: auto;
	}

	.kt-portlet__head.shop_count { min-height: 35px; }
	.search-category-box,.search-integral-box { margin-left: -15px; height: 40px; line-height: 40px; }
	li.search-box-item { float: left; margin-left: 5px; list-style: none; }
	input.form-control.integral { width: 80px; display: inline; }
	.btn.btn-label-success { background-color: #fff; color: #333333; }
	.kt-portlet { margin-bottom: 10px; }

	/*搜索*/
	.input-group-prepend { height: 40px; }
	input.form-control { height: 40px; }
	button.btn.btn-info.btn-flat.btn-lg { padding: 0.45rem 1rem; border-radius: 5px; }
</style>

<div class="kt-container  {$theme_layout_class}  kt-grid__item kt-grid__item--fluid">

	<div class="kt-portlet">
		<div class="kt-portlet__head shop_count">
			<div class="kt-portlet__head-label">
				<h3 class="kt-portlet__head-title">
					商品筛选 <small>共{$goods_list|count}件商品</small>
				</h3>
			</div>
		</div>

		<div class="nav">
			<form class="kt-form" method="post" action="{:url('mall/category/index')}">
				<div class="search-category-box">
					<ul class="search-box">
						<li class="search-box-item">
							商品类型：
						</li>

						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>request()->param('integral'),'search'=>$parem.search])}" class="btn {//$parem.category? 'btn-label-success' : 'btn-success'} btn-sm">全部</a>
						</li>

						{volist name="category" id="cate"}
						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>$cate.id,'integral'=>request()->param('integral'),'search'=>$parem.search])}"
							   class="btn {$parem.category == $cate.id ? 'btn-success' : 'btn-label-success'} btn-sm btn-pill"> {$cate.title} </a>
						</li>
						{/volist}
					</ul>
				</div>
				<div class="search-integral-box">
					<ul class="search-box">
						<li class="search-box-item">
							积分范围：
						</li>

						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>'','search'=>$parem.search])}"
							   class="btn {$parem.integral? 'btn-label-success' : 'btn-success'} btn-sm">全部</a>
						</li>
						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>'0,500','search'=>$parem.search])}"
							   class="btn {$parem.integral != '0,500' ? 'btn-label-success' : 'btn-success'} btn-pill"> 0-500 </a>
						</li>
						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>'500,1000','search'=>$parem.search])}"
							   class="btn {$parem.integral != '500,1000' ? 'btn-label-success' : 'btn-success'} btn-pill"> 500-1000 </a>
						</li>
						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>'1000,2000','search'=>$parem.search])}"
							   class="btn {$parem.integral != '1000,2000' ? 'btn-label-success' : 'btn-success'} btn-pill"> 1000-2000 </a>
						</li>
						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>'2000,5000','search'=>$parem.search])}"
							   class="btn {$parem.integral != '2000,5000' ? 'btn-label-success' : 'btn-success'} btn-pill"> 2000-5000 </a>
						</li>
						<li class="search-box-item">
							<a href="{:url('mall/category/index',['id'=>request()->param('id'),'integral'=>'5000,10000','search'=>$parem.search])}"
							   class="btn {$parem.integral != '5000,10000' ? 'btn-label-success' : 'btn-success'} btn-pill"> 5000-10000 </a>
						</li>
						<li class="search-box-item">
							<input type="text" class="form-control integral" name="start" value="{$parem.start?$parem.start:''}" placeholder="最低积分"> -
							<input type="text" class="form-control integral" name="end" value="{$parem.end?$parem.end:''}" placeholder="最高积分">
							<input type="hidden" class="input_category" name="category" value="{$parem.category}">
							<input type="hidden" class="input_category" name="search" value="{$parem.search}">

							<button type="submit" class="btn btn-info btn-sm ajax-submit kt-margin-l-15"> &nbsp;搜 索&nbsp;</button>
							<button type="reset" href="" class="btn btn-sm btn-success kt-margin-l-15">
								&nbsp;重 置&nbsp;
							</button>
						</li>
					</ul>
				</div>
			</form>
		</div>

	</div>

	<div class="row">
		<div class="col-md-12">
			<div class="row">
				{notempty name="goods_list"}
				{volist name="goods_list" id="goods"}
				<div class="col-md-3">
					<div class="kt-portlet kt-portlet--height-fluid">
						<div class="kt-portlet__head kt-portlet__head--noborder">
							<div class="kt-portlet__head-label">
								<h3 class="kt-portlet__head-title">
								</h3>
							</div>
							<div class="kt-portlet__head-toolbar">
								<span class="kt-badge kt-badge--danger kt-badge--inline">新品</span>
							</div>
						</div>
						<div class="kt-portlet__body kt-portlet__body--fit-y">

							<!--begin::Widget -->
							<div class="kt-widget kt-widget--user-profile-4">
								<div class="kt-widget__head">
									<div class="kt-widget__media">
										<a href="{:url('mall/goods/index',['id'=>$goods.id])}"><img class="kt-widget__img kt-hidden-" src="{$goods.cover_id|thumb=250,188}" alt="image"></a>
										<div class="kt-widget__pic kt-widget__pic--danger kt-font-danger kt-font-boldest kt-hidden">
											JB
										</div>
									</div>
									<div class="kt-widget__content">
										<div class="kt-widget__section kt-padding-b-10">
											<a href="{:url('mall/goods/index',['id'=>$goods.id])}" class="kt-widget__username">
												{$goods.title}
											</a>
											<div class="kt-widget__button">
												<span class="kt-badge kt-badge--dark kt-badge--inline">{$goods.price|intval}积分</span>
											</div>
											<div class="kt-widget__action">
												<a href="{:url('mall/api.bookmark/add',['id'=>$goods.id])}" class="btn btn-primary btn-sm ajax-post ajax-get"><i class="fa fa-bookmark"></i> 收藏</a>
												<a href="{:url('mall/api.goods/buy',['id'=>$goods.id])}" class="btn btn-success btn-sm ajax-post ajax-get"><i class="fa fa-cart-plus"></i> 购买</a>
											</div>
										</div>
									</div>
								</div>
							</div>

							<!--end::Widget -->
						</div>
					</div>
				</div>


				{/volist}
				{else /}
				<span>
												暂时没有数据
											</span>
				{/notempty}

			</div>
			{$pagehtml}
		</div>
	</div>

</div>